package com.wc.blue_bridge_test.base.T10;

import java.io.PrintWriter;
import java.util.Scanner;

/**
 * @Author congege
 * @Description 杨辉三角形
 * https://lx.lanqiao.cn/problem.page?gpid=T10
 * @Date Created in 2023/12/24-11:24
 */
public class Main {
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int[] arr1 = new int[20];
        int[] arr2 = new int[20];
        arr1[1] = 1;
        arr1[2] = 1;
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n >= 1) {
            out.println("1");
        }
        if (n >= 2) {
            out.println("1 1");
        }
        if (n > 2) {
            for (int i = 3; i <= n; i++) {
                int bound = (i + 1) / 2;
                arr2[1] = 1;
                out.print(arr2[1]);
                for (int j = 2; j <= bound; j++) {
                    arr2[j] = arr1[j] + arr1[j - 1];
                }
                if ((i & 1) == 1) {
                    arr2[bound] = arr1[bound - 1] * 2;
                    for (int j = 2; j <= bound; j++) {
                        out.print(' ');
                        out.print(arr2[j]);
                    }
                    for (int j = bound - 1; j >= 1; j--) {
                        out.print(' ');
                        out.print(arr2[j]);
                    }
                } else {
                    for (int j = 2; j <= bound; j++) {
                        out.print(' ');
                        out.print(arr2[j]);
                    }
                    for (int j = bound; j >= 1; j--) {
                        out.print(' ');
                        out.print(arr2[j]);
                    }
                }
                out.println();
                System.arraycopy(arr2, 1, arr1, 1, 19);
            }
        }

        out.flush();
    }
}
